import db.DBSession;
import entity.User;
import org.apache.ibatis.session.SqlSession;

/**
 * @ClassName: Main
 * @Author: Leo
 * @Description:
 * @Date: 2019/4/18 14:37
 */
public class Main {
    public static void main(String[] args) {
        SqlSession sqlSession = DBSession.getSession();
        /*List<Admin> list = sqlSession.selectList("selectAllAdmin");
        for (Admin admin : list) {
            System.out.println(admin);
        }

        List<User> list1 = sqlSession.selectList("selectAllUser");
        for (User userser : list1) {
            System.out.println(userser);
        }*/

        User user = sqlSession.selectOne("selectByUsername","user");
        System.out.println(user);
        System.out.println(sqlSession.selectOne("selectMD5","user"));

        /*Admin admin = sqlSession.selectOne("selectByUserName", "admin");
        System.out.println(admin);*/
    }
}
